package grammar;

import java.util.List;
import java.util.Vector;

public class PrerequisiteCruncher {
	
	public static List<String> getPrerequisites(String source){
		List<String> list = new Vector<String>();
		
		List<String> temp =	PrerequisiteTokenizer.tokenize(source);
		
		Node root = new Node(temp.get(0));
		
		for (int i=1; i<temp.size(); i++){
			Node.insertNode(root, temp.get(i));
		}
		
		list = Node.getPrerequisites(root);		
		
		return list;
	}
	
}
